#include"../include/cmd.h"

int cd_command(int fd,cmd_t* cmd)
{
    char* filename;
    filename=cmd->args[0].arg;
    int ret=chdir(filename);
    if(ret==0)
    {
        send(fd,&ret,4,0);
        return 3;
    }
    if(ret!=0)
    {
        int a=1;
        send(fd,&a,4,0);
        return -1;
    }
}
